package com.tjetc.service.impl;

import com.tjetc.vo.Result;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.tjetc.domain.RoomAddress;
import com.tjetc.mapper.RoomAddressMapper;
import com.tjetc.service.RoomAddressService;

import java.util.List;

@Service
public class RoomAddressServiceImpl implements RoomAddressService{

    @Resource
    private RoomAddressMapper roomAddressMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return roomAddressMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(RoomAddress record) {
        return roomAddressMapper.insert(record);
    }

    @Override
    public int insertSelective(RoomAddress record) {
        return roomAddressMapper.insertSelective(record);
    }

    @Override
    public RoomAddress selectByPrimaryKey(Integer id) {
        return roomAddressMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(RoomAddress record) {
        return roomAddressMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(RoomAddress record) {
        return roomAddressMapper.updateByPrimaryKey(record);
    }

    @Override
    public Result selByClinicId(Integer cid) {
        List<RoomAddress> roomAddresses = roomAddressMapper.selectByCid(cid);
        return Result.ok(roomAddresses);
    }

}
